package com.v5ba.server.service.impl;

import com.v5ba.server.dao.UserRepository;
import com.v5ba.server.entity.User;
import com.v5ba.server.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yiren
 * @date 2018/6/17
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserRepository userRepository;

    @Override
    public void add(String name, String phone) {
        User user = new User();
        user.setName(name);
        user.setPhone(phone);
        userRepository.save(user);
    }
}
